package com.ghost.view.UI
{
	import com.ghost.UI.Ghost_Btn;
	import com.ghost.interfaces.Ibaseui;
	import com.ghost.manager.Js_manager;
	import com.ghost.manager.Tip_manager;
	import com.ghost.model.Global_data;
	import com.ghost.model.UI_skin_data;
	import com.ghost.view.Base_effect;
	
	import flash.events.MouseEvent;

	/**
	 * 右上角的ui 
	 * @author ghost
	 * 
	 */	
	public class UI_top_right extends Base_effect implements Ibaseui
	{
		private var screen_set_btn:Ghost_Btn;//屏幕设置按钮
		private var i:int;//点击更改屏幕次数
		public function UI_top_right()
		{
			screen_set_btn = new Ghost_Btn(UI_skin_data.ghost_btn_skin_v,screen_Handler);
			screen_set_btn.setSize(52,20);
			screen_set_btn.label = "设置";
			//screen_set_btn.set_icon();
			Tip_manager.getInstance().add_tip(screen_set_btn,"001");
			this.addChild(screen_set_btn);
		}
		private function screen_Handler(e:MouseEvent):void
		{
			i++;
			if(i%2)
			{
				Js_manager.getInstance().resize_Stage(1440,700);
			}
			else
			{
				Js_manager.getInstance().resize_Stage(1000,600);
			}
		}
		public function reflash_x_y(e:*):void
		{
			this.x = Global_data.stage_s_width-this.width;
			this.y = 0;
		}
		public function hide():void
		{
			this.visible = false;
		}
		public function show():void
		{
			this.visible = true;
		}
	}
}